home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18218 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: nntp.teleport.com!plogan
  2. From: plogan@teleport.com (Patrick Logan)
  3. Newsgroups: comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Will Java kill C++?
  5. Followup-To: comp.lang.c++,comp.lang.smalltalk
  6. Date: 19 Apr 1996 13:58:58 GMT
  7. Organization: Teleport - Portland's Public Access (503) 220-1016
  8. Message-ID: <4l8672$a03@nadine.teleport.com>
  9. References: <3134D499.653E@ix.netcom.com> <4kbfn8$1bu@news1.is.net> <4kqjf6$kh0@kaiwan009.kaiwan.com> <317173F1.5790@concentric.net> <Dpz6It.2An@undergrad.math.uwaterloo.ca> <31759951.6E0@polymorphicSoftware.com>
  10. NNTP-Posting-Host: julie.teleport.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Hal Hildebrand (halh@polymorphicSoftware.com) wrote:
  14.  
  15. : Nice try.  Smalltalk can't eliminate tail recursion for all the
  16. : reasons that it is claimed to be slow.  No type information...
  17.  
  18. Huh? Type information has nothing to do with tail recursion
  19. elimination. Otherwise Scheme would be blowing stacks all over
  20. the planet.
  21.  
  22. Consider...
  23.  
  24. SomeObject>>someMessage: anObject
  25.     | anotherObject |
  26.     anotherObject := anObject someOtherMessage.
  27.     ^anotherObject yetAnotherMessage
  28.  
  29. The second message send in this method is tail recursive since
  30. the sender of #someMessage can directly receive the answer from
  31. sending anotherObject the #yetAnotherMessage.
  32.  
  33. --
  34. Patrick Logan plogan@teleport.com
  35.